Optimal. Leaf size=50 \[ \frac{1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac{1}{8} b (8 a+3 b) \sin (x) \cos (x)-\frac{1}{4} b^2 \sin ^3(x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0157437, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3179} \[ \frac{1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac{1}{8} b (8 a+3 b) \sin (x) \cos (x)-\frac{1}{4} b^2 \sin ^3(x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3179
Rubi steps
\begin{align*} \int \left (a+b \sin ^2(x)\right )^2 \, dx &=\frac{1}{8} \left (8 a^2+8 a b+3 b^2\right ) x-\frac{1}{8} b (8 a+3 b) \cos (x) \sin (x)-\frac{1}{4} b^2 \cos (x) \sin ^3(x)\\ \end{align*}
Mathematica [A] time = 0.0576988, size = 43, normalized size = 0.86 \[ \frac{1}{32} \left (4 x \left (8 a^2+8 a b+3 b^2\right )-8 b (2 a+b) \sin (2 x)+b^2 \sin (4 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 42, normalized size = 0.8 \begin{align*}{b}^{2} \left ( -{\frac{\cos \left ( x \right ) }{4} \left ( \left ( \sin \left ( x \right ) \right ) ^{3}+{\frac{3\,\sin \left ( x \right ) }{2}} \right ) }+{\frac{3\,x}{8}} \right ) +2\,ab \left ( -1/2\,\sin \left ( x \right ) \cos \left ( x \right ) +x/2 \right ) +{a}^{2}x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.938432, size = 53, normalized size = 1.06 \begin{align*} \frac{1}{32} \, b^{2}{\left (12 \, x + \sin \left (4 \, x\right ) - 8 \, \sin \left (2 \, x\right )\right )} + \frac{1}{2} \, a b{\left (2 \, x - \sin \left (2 \, x\right )\right )} + a^{2} x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62652, size = 116, normalized size = 2.32 \begin{align*} \frac{1}{8} \,{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} x + \frac{1}{8} \,{\left (2 \, b^{2} \cos \left (x\right )^{3} -{\left (8 \, a b + 5 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.28142, size = 110, normalized size = 2.2 \begin{align*} a^{2} x + a b x \sin ^{2}{\left (x \right )} + a b x \cos ^{2}{\left (x \right )} - a b \sin{\left (x \right )} \cos{\left (x \right )} + \frac{3 b^{2} x \sin ^{4}{\left (x \right )}}{8} + \frac{3 b^{2} x \sin ^{2}{\left (x \right )} \cos ^{2}{\left (x \right )}}{4} + \frac{3 b^{2} x \cos ^{4}{\left (x \right )}}{8} - \frac{5 b^{2} \sin ^{3}{\left (x \right )} \cos{\left (x \right )}}{8} - \frac{3 b^{2} \sin{\left (x \right )} \cos ^{3}{\left (x \right )}}{8} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13907, size = 57, normalized size = 1.14 \begin{align*} \frac{1}{32} \, b^{2} \sin \left (4 \, x\right ) + \frac{1}{8} \,{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} x - \frac{1}{4} \,{\left (2 \, a b + b^{2}\right )} \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]